<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
    <meta content=always name=referrer>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/style_user.css">
    <script src="__STATIC__/js/jquery-1.8.2.js"></script>
    <title>修改登录密码</title>
</head>
{include file="public/href" /}
<body>
<div class="wrap-pass">
    <div class="header">
        <p>修改登录密码</p>
        <img src="__STATIC__/img_user/back.png" class="back" onclick=window.location.href="{:url('mobile/user_info/user_account_safety')}">
    </div>
    <form action="" method="post" id="form"  >
    <div class="center">
        <div>
            <label>原密码</label>
            <input class="text" type="password" placeholder="原密码" name="old_pwd" datatype="s6-18" nullmsg="旧密码不能为空" errormsg="请输入6到18位旧密码" />
        </div>
        <div>
            <label>新密码</label>
            <input class="text" type="password" placeholder="新密码" name="new_pwd" datatype="s6-18" nullmsg="新密码不能为空" errormsg="请输入6到18位新密码" />
        </div>
        <div>
            <label>确认密码</label>
            <input class="text" type="password" placeholder="确认密码" name="confirm_new_pwd" recheck="new_pwd" datatype="*" nullmsg="确认密码不能为空" />
        </div>
    </div>
    <input type="submit" class="submit" id="yes" value="确定">
    </form>
</div>
{include file="public/src" /}
<script>
    //验证表单元素
    $(function () {
        $.Tipmsg.r = null;
        $.Tipmsg.p = null;
        var demo = $("#form").Validform({
            btnSubmit:'#yes',
            tiptype: function (msg) {
                layer.open({content: msg, skin: 'msg', time:2});
            },
            tipSweep: true,
            ajaxPost:true,
            callback:function(t){
                layer.open({content:t.message,skin:'msg',time:2});
                if (t.code == 200){
                    setTimeout(function () {
                        window.location.href = "{:url('mobile/user_port/login')}";
                    },2000);
                }
            }
        });
        demo.config({
            ajaxpost:{
                error: function () {
                    layer.open({content:'网络繁忙,请重试',skin:'msg',time:2});
                }
            }
        })
    });
</script>
</body>
</html>